<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateTacheTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateTacheLabel_nom}" for="nom" />
                    <h:inputText id="nom" value="#{tacheController.selected.nom}" title="#{bundle.CreateTacheTitle_nom}" />
                    <h:outputLabel value="#{bundle.CreateTacheLabel_description}" for="description" />
                    <h:inputText id="description" value="#{tacheController.selected.description}" title="#{bundle.CreateTacheTitle_description}" />
                    <h:outputLabel value="#{bundle.CreateTacheLabel_prMa}" for="prMa" />
                    <h:inputText id="prMa" value="#{tacheController.selected.prMa}" title="#{bundle.CreateTacheTitle_prMa}" />
                    <h:outputLabel value="#{bundle.CreateTacheLabel_identif}" for="identif" />
                    <h:inputText id="identif" value="#{tacheController.selected.identif}" title="#{bundle.CreateTacheTitle_identif}" required="true" requiredMessage="#{bundle.CreateTacheRequiredMessage_identif}"/>
                    <h:outputLabel value="#{bundle.CreateTacheLabel_identifTacheprod}" for="identifTacheprod" />
                    <h:selectOneMenu id="identifTacheprod" value="#{tacheController.selected.identifTacheprod}" title="#{bundle.CreateTacheTitle_identifTacheprod}" >
                        <f:selectItems value="#{tacheProductionController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateTacheLabel_identIntervention}" for="identIntervention" />
                    <h:selectOneMenu id="identIntervention" value="#{tacheController.selected.identIntervention}" title="#{bundle.CreateTacheTitle_identIntervention}" >
                        <f:selectItems value="#{interventionController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateTacheLabel_matricule}" for="matricule" />
                    <h:selectOneMenu id="matricule" value="#{tacheController.selected.matricule}" title="#{bundle.CreateTacheTitle_matricule}" >
                        <f:selectItems value="#{employeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{tacheController.create}" value="#{bundle.CreateTacheSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{tacheController.prepareList}" value="#{bundle.CreateTacheShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateTacheIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
